<?

function validaEmail($email) {
	
	if (preg_match("/^([[:alnum:]_.-]){3,}@([[:lower:][:digit:]_.-]{3,})(\.[[:lower:]]{2,3})(\.[[:lower:]]{2})?$/", $email)) {
		return true;
	} else {
		return false;
	}
}

include($_SERVER['DOCUMENT_ROOT'] . "/wp-config.php");
$email = strtolower($_GET['email']);
if (validaEmail($email)) {
	$query = "select * from wp_cliente where email = '$email'";
	$cliente = $wpdb->get_results($query);
	if ($cliente) {
		die();
	} else {
		die($email);
	}
} else {
	die();
}